package com.example.chatroom.common.exception;


import com.example.chatroom.common.errorcode.ErrorCode;
import lombok.Data;

@Data
public class ControllerException extends RuntimeException {
    private Integer code;
    private String msg;

    public ControllerException(ErrorCode errorCode) {
        this.code = errorCode.getErrorCode();
        this.msg=errorCode.getMsg();
    }

    public ControllerException(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public ControllerException() {
        super();
    }
    public ControllerException(String message) {
        super(message);
    }

}
